package org.jsola.hr.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.dto.BaseDTO;

import java.util.List;

import static org.jsola.hr.example.TemplateInfoExample.*;
import javax.validation.constraints.NotNull;

import static org.jsola.hr.example.TemplateInfoExample.E_COMPANY_ID;
import static org.jsola.hr.example.TemplateInfoExample.E_CONTENT;
import static org.jsola.hr.example.TemplateInfoExample.E_NAME;
import static org.jsola.hr.example.TemplateInfoExample.E_TYPE;
import static org.jsola.hr.example.TemplateInfoExample.M_COMPANY_ID_MAX;
import static org.jsola.hr.example.TemplateInfoExample.M_COMPANY_ID_NOT_NULL;
import static org.jsola.hr.example.TemplateInfoExample.M_CONTENT_MAX;
import static org.jsola.hr.example.TemplateInfoExample.M_NAME_MAX;
import static org.jsola.hr.example.TemplateInfoExample.N_COMPANY_ID;
import static org.jsola.hr.example.TemplateInfoExample.N_CONTENT;
import static org.jsola.hr.example.TemplateInfoExample.N_NAME;
import static org.jsola.hr.example.TemplateInfoExample.N_TYPE;

/**
 * @author zhr
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "新增【模板信息】的参数")
@Data
public class TemplateInfoAddDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_TYPE, example = E_TYPE)
    private Integer type;

    @ApiModelProperty(notes = N_NAME, example = E_NAME)
    @Length(max = 100, message = M_NAME_MAX)
    private String name;

    @ApiModelProperty(notes = N_CONTENT, example = E_CONTENT)
    @Length(max = 2147483647, message = M_CONTENT_MAX)
    private String content;

    @ApiModelProperty(notes = N_TEMPLATE_FIELD_DTO_LIST, example = "", required = true)
    private List<TemplateFieldAddDTO> templateFieldAddDTOList;
    @ApiModelProperty(notes = N_COMPANY_ID, example = E_COMPANY_ID, required = true)
    @NotNull(message = M_COMPANY_ID_NOT_NULL)
    @Length(max = 32, message = M_COMPANY_ID_MAX)
    private String companyId;


}

